# Package Publishing

# Plugin Publish Checklist

This is a list of point to check prior to published your package on packages.opentap.io (opens new window).

# Update the Package Definition (package.xml) file:

  • Provide a meaningful Name (opens new window). We advise to make the names human readable, i.e. not Camel Case, no underscores, etc. No need to add "plugin" in the package name, as OpenTAP packages typically contain OpenTAP plugins. The name cannot contain '/' or be changed later, if you want to change the name you must publish the package under another name.
  • Provide <Description> (opens new window) of the package.
  • Provide <Owner> (opens new window). Should be the legal entity, this is likely to be the company you're working for or your name.
  • If your project is open-source, provide <SourceUrl> (opens new window) with a link to your project (GitHub/GitLab etc.). You should also provide a <SourceLicense> (opens new window) to signify the license your project is under. Finally, make sure your repository is publicly available.

See all the available package definition options here (opens new window).

# Verify Dependencies

Make sure all dependencies are available on packages.opentap.io. Also, consider only depending on released versions.

# Publish the Package

There are two main ways of publishing a package.

After upload, go to packages.opentap.io (opens new window) and follow the steps below to make your package public. You only need to do this once, as this will affect all current and future uploaded versions of the package:

  1. Login by clicking the Login button.
  2. After login you will see a menu button with your profile name, click it and go to the Admin page.
  3. Navigate to Packages, find the package you want to publish and click the Publish button.
  4. Fill out the form and click Send Email Request to send an email to the OpenTAP team.

# Uploading from CLI

If you have a project/solution that gets regular updates, it's best practice to run builds, tests and publishing of OpenTAP packages as part of a build pipeline (CI/CD).

To upload packages in a CI/CD environment, we recommend using the Repository Client plugin. You can install it using the setup-opentap action.

Then, to upload your package to packages.opentap.io (opens new window), run: tap repo upload MyPackage.TapPackage --token <USER_TOKEN>

Note: You need a UserToken from the OpenTAP Repository before you can upload. On packages.opentap.io you can login and create new UserTokens directly on the homepage. For other OpenTAP repositories, you should contact the administrator of that OpenTAP Repository.

Below is an example of a Github workflow that automatically publishes TapPackages.

Publish:
    # Only publish on the main branch, the release branch, or if the commit is tagged.
    if: github.ref == 'refs/heads/main' || contains(github.ref, 'refs/heads/release') || contains(github.ref, 'refs/tags/v')
    runs-on: ubuntu-latest
    # This step depends on the build step
    needs:
      - Build
    steps:
      # Download the tap-package artifact from the Build step
      - name: Download TapPackage Arfifact
        uses: actions/download-artifact@v4
        with:
          name: tap-package
          path: .
      # Setup OpenTAP with the PackagePublish package in order to publish the newly created package
      - name: Setup OpenTAP
        uses: opentap/setup-opentap@v1.0
        with:
          version: 9.18.4
          packages: "Repository Client"
      # Publish the package. This requires the package management key to be configured in the 'PUBLIC_REPO_PASS' environment variable.
      - name: Publish
        run: tap repo upload --token ${{ secrets.REPO_USERTOKEN }} *.TapPackage
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23